const express = require('express');
const userRouter = express.Router();
const userCtrol = require('../controller/userController');
const userValidator = require('../validator/userValidator');
// const authToken = require('../middleware/auth');

//用户注册
userRouter.post('/user/register',userValidator.register, userCtrol.userRegister);
// userRouter.post('/user/register',userValidator.register);
//用户登录
userRouter.post('/users/login',userValidator.login,userCtrol.userLogin);
// //获取当前用户
// userRouter.get('/user', userCtrol.getUser);


module.exports = userRouter;